<%@ Page Language="vb" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script  runat="server">
Sub Page_Load(sender As Object, e As EventArgs)	
	Dim myConnString As String =ConfigurationSettings.appSettings("conn") 
    	Dim myConnection As New SqlConnection(myConnString)
    	myConnection.Open()
    	response.write("ServerVersion: " + myConnection.ServerVersion _
       	+ ControlChars.NewLine + "Database: " + myConnection.Database)
   	myConnection.ChangeDatabase("pubs")
     	response.write("ServerVersion: " + myConnection.ServerVersion _
       	+ ControlChars.NewLine + "Database: " + myConnection.Database)
    	myConnection.Close()
End Sub
</script>	
